fix: handleNotify goroutine checks s.done before refreshZone#145
fix: handleNotify goroutine checks s.done before refreshZone#145
Conversation
The handleNotify async goroutine only checked s.done once at startup, then proceeded to long-running operations (Repo.GetZone, refreshZone) without further shutdown checks. Add a second check before refreshZone to allow early exit during server shutdown, avoiding unnecessary work. Fixes #82.
|
Warning Rate limit exceeded
To continue reviewing without waiting, purchase usage credits in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
wg.Add(1)is correctly called beforego func()inhealth_monitor.go. No change needed.s.donecheck befores.refreshZone()in thehandleNotifyasync goroutine. Previously the goroutine only checked shutdown once at startup, then proceeded to long-running operations without further cancellation checks. Now it exits early during shutdown to avoid unnecessary work.Fixes #82.
Test plan
go build ./...— clean buildgo test ./... -timeout 60s— all tests passNote: Issue #80 was investigated and found to be already fixed in the current codebase. The
wg.Add(1)is correctly called beforego func()at health_monitor.go:112.